export default (params) => {
    //加载中
    wx.showLoading({
        title: '加载中',
    });

    return new Promise((resolve, reject) => {
        wx.request({
            ...params,
            success: (result) => {
                resolve(result.data)
            },
            fail: (err) => {
                reject(err)
            },
            complete: () => {
                wx.hideLoading();
            }
        });
    })
}